.class public final Lnbisdk/gf;
.super Lcom/nbi/location/LocationProvider;

# interfaces
.implements Lcom/nbi/location/LocationListener;


# instance fields
.field private ca:Lcom/nbi/common/NBIContext;

.field private nV:I

.field private rT:Lnbisdk/bt;

.field private rU:Ljava/util/Vector;

.field private rV:Ljava/util/Vector;

.field private rW:Lnbisdk/cj;

.field private rX:Lnbisdk/hi;

.field private rY:J

.field private rZ:Z


# direct methods
.method public constructor <init>(Lcom/nbi/common/NBIContext;Lcom/nbi/location/LocationConfig;)V
    .locals 3

    const/4 v2, 0x1

    const/4 v0, 0x0

    invoke-direct {p0}, Lcom/nbi/location/LocationProvider;-><init>()V

    iput-object v0, p0, Lnbisdk/gf;->rT:Lnbisdk/bt;

    iput-object v0, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    iput-object v0, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    iput-object v0, p0, Lnbisdk/gf;->rW:Lnbisdk/cj;

    iput-object v0, p0, Lnbisdk/gf;->rX:Lnbisdk/hi;

    const-wide/16 v0, 0x0

    iput-wide v0, p0, Lnbisdk/gf;->rY:J

    const/4 v0, 0x0

    iput v0, p0, Lnbisdk/gf;->nV:I

    iput-boolean v2, p0, Lnbisdk/gf;->rZ:Z

    iput v2, p0, Lnbisdk/gf;->nV:I

    iput-object p1, p0, Lnbisdk/gf;->ca:Lcom/nbi/common/NBIContext;

    if-eqz p2, :cond_2

    check-cast p2, Lnbisdk/bt;

    iput-object p2, p0, Lnbisdk/gf;->rT:Lnbisdk/bt;

    :goto_0
    invoke-direct {p0}, Lnbisdk/gf;->je()Z

    invoke-virtual {p1}, Lcom/nbi/common/NBIContext;->getInternalObject()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnbisdk/bl;

    if-eqz v0, :cond_0

    invoke-virtual {v0, p0}, Lnbisdk/bl;->b(Lnbisdk/rh;)V

    :cond_0
    iget-object v0, p0, Lnbisdk/gf;->rT:Lnbisdk/bt;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lnbisdk/gf;->rT:Lnbisdk/bt;

    invoke-virtual {v0}, Lnbisdk/bt;->isWarmUpFix()Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lnbisdk/gf;->rW:Lnbisdk/cj;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lnbisdk/gf;->rW:Lnbisdk/cj;

    invoke-interface {v0}, Lnbisdk/cj;->bm()V

    :cond_1
    const/4 v0, 0x3

    iput v0, p0, Lnbisdk/gf;->nV:I

    return-void

    :cond_2
    invoke-static {}, Lcom/nbi/location/LocationConfig;->createLocationConfig()Lcom/nbi/location/LocationConfig;

    move-result-object v0

    check-cast v0, Lnbisdk/bt;

    iput-object v0, p0, Lnbisdk/gf;->rT:Lnbisdk/bt;

    goto :goto_0
.end method

.method private je()Z
    .locals 2

    const/4 v0, 0x1

    :try_start_0
    iget-object v1, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    if-nez v1, :cond_0

    new-instance v1, Ljava/util/Vector;

    invoke-direct {v1}, Ljava/util/Vector;-><init>()V

    iput-object v1, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    :cond_0
    iget-object v1, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    if-nez v1, :cond_1

    new-instance v1, Ljava/util/Vector;

    invoke-direct {v1}, Ljava/util/Vector;-><init>()V

    iput-object v1, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    :cond_1
    iget-object v1, p0, Lnbisdk/gf;->ca:Lcom/nbi/common/NBIContext;

    invoke-static {v1}, Lnbisdk/bd;->d(Lcom/nbi/common/NBIContext;)Lnbisdk/cj;

    move-result-object v1

    iput-object v1, p0, Lnbisdk/gf;->rW:Lnbisdk/cj;

    iget-object v1, p0, Lnbisdk/gf;->ca:Lcom/nbi/common/NBIContext;

    invoke-static {v1}, Lnbisdk/bd;->b(Lcom/nbi/common/NBIContext;)Lnbisdk/hi;

    move-result-object v1

    iput-object v1, p0, Lnbisdk/gf;->rX:Lnbisdk/hi;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return v0

    :catch_0
    move-exception v0

    const/4 v0, 0x0

    goto :goto_0
.end method

.method private jf()V
    .locals 1

    :cond_0
    :goto_0
    iget-object v0, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    invoke-virtual {v0}, Ljava/util/Vector;->size()I

    move-result v0

    if-lez v0, :cond_1

    iget-object v0, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    invoke-virtual {v0}, Ljava/util/Vector;->firstElement()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnbisdk/ia;

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lnbisdk/ia;->js()Lcom/nbi/location/LocationListener;

    move-result-object v0

    :try_start_0
    invoke-virtual {p0, v0}, Lnbisdk/gf;->cancelGetLocation(Lcom/nbi/location/LocationListener;)V
    :try_end_0
    .catch Lcom/nbi/location/LocationException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Lcom/nbi/location/LocationException;->printStackTrace()V

    goto :goto_0

    :cond_1
    :goto_1
    iget-object v0, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    if-eqz v0, :cond_2

    iget-object v0, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    invoke-virtual {v0}, Ljava/util/Vector;->size()I

    move-result v0

    if-lez v0, :cond_2

    iget-object v0, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    invoke-virtual {v0}, Ljava/util/Vector;->firstElement()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnbisdk/ia;

    if-eqz v0, :cond_1

    invoke-virtual {v0}, Lnbisdk/ia;->js()Lcom/nbi/location/LocationListener;

    move-result-object v0

    :try_start_1
    invoke-virtual {p0, v0}, Lnbisdk/gf;->cancelGetLocation(Lcom/nbi/location/LocationListener;)V
    :try_end_1
    .catch Lcom/nbi/location/LocationException; {:try_start_1 .. :try_end_1} :catch_1

    goto :goto_1

    :catch_1
    move-exception v0

    invoke-virtual {v0}, Lcom/nbi/location/LocationException;->printStackTrace()V

    goto :goto_1

    :cond_2
    return-void
.end method


# virtual methods
.method public final cancelGetLocation(Lcom/nbi/location/LocationListener;)V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/nbi/location/LocationException;
        }
    .end annotation

    if-nez p1, :cond_0

    new-instance v0, Lcom/nbi/location/LocationException;

    const/16 v1, 0x7d0

    invoke-direct {v0, v1}, Lcom/nbi/location/LocationException;-><init>(I)V

    throw v0

    :cond_0
    :goto_0
    iget-object v0, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    invoke-virtual {v0}, Ljava/util/Vector;->size()I

    move-result v0

    if-lez v0, :cond_1

    iget-object v0, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    invoke-virtual {v0}, Ljava/util/Vector;->firstElement()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnbisdk/ia;

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lnbisdk/ia;->js()Lcom/nbi/location/LocationListener;

    move-result-object v1

    if-ne p1, v1, :cond_0

    iget-object v1, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    invoke-virtual {v1, v0}, Ljava/util/Vector;->removeElement(Ljava/lang/Object;)Z

    invoke-virtual {v0}, Lnbisdk/ia;->cancel()Z

    goto :goto_0

    :cond_1
    :goto_1
    iget-object v0, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    if-eqz v0, :cond_2

    iget-object v0, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    invoke-virtual {v0}, Ljava/util/Vector;->size()I

    move-result v0

    if-lez v0, :cond_2

    iget-object v0, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    invoke-virtual {v0}, Ljava/util/Vector;->firstElement()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnbisdk/ia;

    if-eqz v0, :cond_1

    invoke-virtual {v0}, Lnbisdk/ia;->js()Lcom/nbi/location/LocationListener;

    move-result-object v1

    if-ne p1, v1, :cond_1

    iget-object v1, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    invoke-virtual {v1, v0}, Ljava/util/Vector;->removeElement(Ljava/lang/Object;)Z

    invoke-virtual {v0}, Lnbisdk/ia;->cancel()Z

    goto :goto_1

    :cond_2
    return-void
.end method

.method public final fT()V
    .locals 1

    invoke-direct {p0}, Lnbisdk/gf;->jf()V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lnbisdk/gf;->rZ:Z

    iget-object v0, p0, Lnbisdk/gf;->rX:Lnbisdk/hi;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/gf;->rX:Lnbisdk/hi;

    invoke-interface {v0}, Lnbisdk/hi;->fw()V

    :cond_0
    const/4 v0, 0x2

    iput v0, p0, Lnbisdk/gf;->nV:I

    invoke-virtual {p0}, Lnbisdk/gf;->onDestroy()V

    return-void
.end method

.method public final fU()V
    .locals 1

    const/4 v0, 0x0

    :try_start_0
    iput-boolean v0, p0, Lnbisdk/gf;->rZ:Z

    iget-object v0, p0, Lnbisdk/gf;->rX:Lnbisdk/hi;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/gf;->rX:Lnbisdk/hi;

    invoke-interface {v0}, Lnbisdk/hi;->fw()V

    :cond_0
    invoke-direct {p0}, Lnbisdk/gf;->jf()V

    iget-object v0, p0, Lnbisdk/gf;->rW:Lnbisdk/cj;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lnbisdk/gf;->rW:Lnbisdk/cj;

    invoke-interface {v0}, Lnbisdk/cj;->destroy()V

    :cond_1
    const/4 v0, 0x0

    iput-object v0, p0, Lnbisdk/gf;->rW:Lnbisdk/cj;

    const/4 v0, 0x2

    iput v0, p0, Lnbisdk/gf;->nV:I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method public final getApiLevel()I
    .locals 1

    const/4 v0, 0x1

    return v0
.end method

.method public final getOneFix(Lcom/nbi/location/LocationListener;I)V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/nbi/location/LocationException;
        }
    .end annotation

    iget-object v0, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    if-nez v0, :cond_1

    const/16 v0, 0x7d0

    invoke-virtual {p0, v0}, Lnbisdk/gf;->onLocationError(I)V

    :cond_0
    :goto_0
    return-void

    :cond_1
    const/4 v0, -0x1

    if-ne p2, v0, :cond_2

    new-instance v0, Lnbisdk/kf;

    iget-object v1, p0, Lnbisdk/gf;->ca:Lcom/nbi/common/NBIContext;

    invoke-direct {v0, v1, p1}, Lnbisdk/kf;-><init>(Lcom/nbi/common/NBIContext;Lcom/nbi/location/LocationListener;)V

    invoke-virtual {v0}, Lnbisdk/ia;->aS()Z

    goto :goto_0

    :cond_2
    const/4 v0, -0x2

    if-ne p2, v0, :cond_3

    new-instance v0, Lnbisdk/di;

    iget-object v1, p0, Lnbisdk/gf;->ca:Lcom/nbi/common/NBIContext;

    invoke-direct {v0, v1, p1}, Lnbisdk/di;-><init>(Lcom/nbi/common/NBIContext;Lcom/nbi/location/LocationListener;)V

    invoke-virtual {v0}, Lnbisdk/ia;->aS()Z

    goto :goto_0

    :cond_3
    packed-switch p2, :pswitch_data_0

    :pswitch_0
    new-instance v0, Lnbisdk/kz;

    iget-object v1, p0, Lnbisdk/gf;->ca:Lcom/nbi/common/NBIContext;

    invoke-direct {v0, v1, p0}, Lnbisdk/kz;-><init>(Lcom/nbi/common/NBIContext;Lcom/nbi/location/LocationListener;)V

    invoke-virtual {v0, p1}, Lnbisdk/ia;->a(Lcom/nbi/location/LocationListener;)V

    :goto_1
    iget-object v1, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    invoke-virtual {v1, v0}, Ljava/util/Vector;->addElement(Ljava/lang/Object;)V

    invoke-virtual {v0}, Lnbisdk/ia;->aS()Z

    move-result v0

    if-nez v0, :cond_0

    const/16 v0, 0x2346

    invoke-virtual {p0, v0}, Lnbisdk/gf;->onLocationError(I)V

    goto :goto_0

    :pswitch_1
    new-instance v0, Lnbisdk/bx;

    iget-object v1, p0, Lnbisdk/gf;->ca:Lcom/nbi/common/NBIContext;

    invoke-direct {v0, v1, p0}, Lnbisdk/bx;-><init>(Lcom/nbi/common/NBIContext;Lcom/nbi/location/LocationListener;)V

    invoke-virtual {v0, p1}, Lnbisdk/ia;->a(Lcom/nbi/location/LocationListener;)V

    goto :goto_1

    :pswitch_2
    new-instance v0, Lnbisdk/ck;

    iget-object v1, p0, Lnbisdk/gf;->ca:Lcom/nbi/common/NBIContext;

    invoke-direct {v0, v1, p0}, Lnbisdk/ck;-><init>(Lcom/nbi/common/NBIContext;Lcom/nbi/location/LocationListener;)V

    invoke-virtual {v0, p1}, Lnbisdk/ia;->a(Lcom/nbi/location/LocationListener;)V

    goto :goto_1

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_0
        :pswitch_2
    .end packed-switch
.end method

.method public final getState()I
    .locals 3

    iget-object v0, p0, Lnbisdk/gf;->rW:Lnbisdk/cj;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lnbisdk/gf;->rW:Lnbisdk/cj;

    invoke-interface {v0}, Lnbisdk/cj;->bh()I

    move-result v0

    if-eqz v0, :cond_1

    :cond_0
    :goto_0
    return v0

    :cond_1
    iget v0, p0, Lnbisdk/gf;->nV:I

    iget v1, p0, Lnbisdk/gf;->nV:I

    const/4 v2, 0x3

    if-ne v1, v2, :cond_0

    iget-object v1, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    invoke-virtual {v1}, Ljava/util/Vector;->size()I

    move-result v1

    if-lez v1, :cond_0

    iget-object v0, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Ljava/util/Vector;->elementAt(I)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lnbisdk/ba;

    invoke-virtual {p0}, Lnbisdk/ba;->aR()Z

    move-result v0

    const/4 v1, 0x1

    if-ne v0, v1, :cond_2

    const/4 v0, 0x5

    goto :goto_0

    :cond_2
    const/4 v0, 0x4

    goto :goto_0
.end method

.method public final h(Lcom/nbi/common/NBIContext;)V
    .locals 2

    const/4 v1, 0x1

    iput v1, p0, Lnbisdk/gf;->nV:I

    iget-object v0, p0, Lnbisdk/gf;->ca:Lcom/nbi/common/NBIContext;

    invoke-virtual {v0, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    iput-object p1, p0, Lnbisdk/gf;->ca:Lcom/nbi/common/NBIContext;

    :cond_0
    invoke-direct {p0}, Lnbisdk/gf;->je()Z

    iget-object v0, p0, Lnbisdk/gf;->ca:Lcom/nbi/common/NBIContext;

    invoke-static {v0}, Lnbisdk/bd;->d(Lcom/nbi/common/NBIContext;)Lnbisdk/cj;

    move-result-object v0

    iput-object v0, p0, Lnbisdk/gf;->rW:Lnbisdk/cj;

    iget-object v0, p0, Lnbisdk/gf;->ca:Lcom/nbi/common/NBIContext;

    invoke-static {v0}, Lnbisdk/bd;->b(Lcom/nbi/common/NBIContext;)Lnbisdk/hi;

    move-result-object v0

    iput-object v0, p0, Lnbisdk/gf;->rX:Lnbisdk/hi;

    invoke-virtual {p1}, Lcom/nbi/common/NBIContext;->getInternalObject()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnbisdk/bl;

    if-eqz v0, :cond_1

    invoke-virtual {v0, p0}, Lnbisdk/bl;->b(Lnbisdk/rh;)V

    :cond_1
    iget-object v0, p0, Lnbisdk/gf;->rT:Lnbisdk/bt;

    if-eqz v0, :cond_2

    iget-object v0, p0, Lnbisdk/gf;->rT:Lnbisdk/bt;

    invoke-virtual {v0}, Lnbisdk/bt;->isWarmUpFix()Z

    move-result v0

    if-eqz v0, :cond_2

    iget-object v0, p0, Lnbisdk/gf;->rW:Lnbisdk/cj;

    if-eqz v0, :cond_2

    iget-object v0, p0, Lnbisdk/gf;->rW:Lnbisdk/cj;

    invoke-interface {v0}, Lnbisdk/cj;->bm()V

    :cond_2
    iput-boolean v1, p0, Lnbisdk/gf;->rZ:Z

    const/4 v0, 0x3

    iput v0, p0, Lnbisdk/gf;->nV:I

    return-void
.end method

.method public final jd()Lnbisdk/bt;
    .locals 1

    iget-object v0, p0, Lnbisdk/gf;->rT:Lnbisdk/bt;

    return-object v0
.end method

.method public final locationUpdated(Lcom/nbi/location/Location;)V
    .locals 6

    const-wide/16 v4, 0x0

    iget-boolean v0, p0, Lnbisdk/gf;->rZ:Z

    if-nez v0, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    new-instance v1, Lcom/nbi/location/Location;

    invoke-direct {v1, p1}, Lcom/nbi/location/Location;-><init>(Lcom/nbi/location/Location;)V

    iget-object v0, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    if-eqz v0, :cond_3

    :cond_2
    :goto_1
    iget-object v0, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    invoke-virtual {v0}, Ljava/util/Vector;->size()I

    move-result v0

    if-lez v0, :cond_3

    iget-object v0, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    invoke-virtual {v0}, Ljava/util/Vector;->firstElement()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnbisdk/ia;

    if-eqz v0, :cond_2

    invoke-virtual {v0}, Lnbisdk/ia;->js()Lcom/nbi/location/LocationListener;

    move-result-object v2

    if-eqz v2, :cond_3

    invoke-interface {v2, v1}, Lcom/nbi/location/LocationListener;->locationUpdated(Lcom/nbi/location/Location;)V

    iget-object v2, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    invoke-virtual {v2, v0}, Ljava/util/Vector;->removeElement(Ljava/lang/Object;)Z

    invoke-virtual {v0}, Lnbisdk/ia;->cancel()Z

    goto :goto_1

    :cond_3
    iget-object v0, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    if-eqz v0, :cond_5

    const/4 v0, 0x0

    move v2, v0

    :goto_2
    iget-object v0, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    invoke-virtual {v0}, Ljava/util/Vector;->size()I

    move-result v0

    if-ge v2, v0, :cond_5

    iget-object v0, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    invoke-virtual {v0, v2}, Ljava/util/Vector;->elementAt(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnbisdk/ia;

    if-eqz v0, :cond_4

    invoke-virtual {v0}, Lnbisdk/ia;->js()Lcom/nbi/location/LocationListener;

    move-result-object v0

    if-eqz v0, :cond_4

    invoke-interface {v0, v1}, Lcom/nbi/location/LocationListener;->locationUpdated(Lcom/nbi/location/Location;)V

    :cond_4
    add-int/lit8 v0, v2, 0x1

    move v2, v0

    goto :goto_2

    :cond_5
    iget-object v0, p0, Lnbisdk/gf;->rT:Lnbisdk/bt;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/gf;->rT:Lnbisdk/bt;

    invoke-virtual {v0}, Lnbisdk/bt;->getCollectWiFiProbes()Z

    move-result v0

    const/4 v1, 0x1

    if-ne v0, v1, :cond_0

    invoke-virtual {p1}, Lcom/nbi/location/Location;->getValid()I

    move-result v0

    and-int/lit8 v0, v0, 0x4

    if-lez v0, :cond_0

    new-instance v0, Lnbisdk/ra;

    invoke-direct {v0}, Lnbisdk/ra;-><init>()V

    if-eqz p1, :cond_6

    if-nez v0, :cond_7

    :cond_6
    :goto_3
    invoke-static {v0}, Lnbisdk/by;->a(Lnbisdk/kw;)V

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    iget-wide v2, p0, Lnbisdk/gf;->rY:J

    sub-long/2addr v0, v2

    const-wide/32 v2, 0xea60

    cmp-long v0, v0, v2

    if-ltz v0, :cond_0

    new-instance v0, Ljava/lang/Thread;

    new-instance v1, Lnbisdk/gf$1;

    invoke-direct {v1, p0}, Lnbisdk/gf$1;-><init>(Lnbisdk/gf;)V

    invoke-direct {v0, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    iput-wide v0, p0, Lnbisdk/gf;->rY:J

    goto/16 :goto_0

    :cond_7
    invoke-virtual {p1}, Lcom/nbi/location/Location;->getValid()I

    move-result v1

    and-int/lit8 v2, v1, 0x4

    if-lez v2, :cond_6

    invoke-virtual {p1}, Lcom/nbi/location/Location;->getLatitude()D

    move-result-wide v2

    invoke-virtual {v0, v2, v3}, Lnbisdk/ra;->setLatitude(D)V

    and-int/lit8 v2, v1, 0x4

    if-lez v2, :cond_6

    invoke-virtual {p1}, Lcom/nbi/location/Location;->getLongitude()D

    move-result-wide v2

    invoke-virtual {v0, v2, v3}, Lnbisdk/ra;->setLongitude(D)V

    and-int/lit8 v2, v1, 0x4

    if-lez v2, :cond_8

    invoke-virtual {p1}, Lcom/nbi/location/Location;->getAltitude()D

    move-result-wide v2

    double-to-int v2, v2

    invoke-virtual {v0, v2}, Lnbisdk/ra;->bp(I)V

    :cond_8
    and-int/lit8 v2, v1, 0x8

    if-lez v2, :cond_9

    invoke-virtual {p1}, Lcom/nbi/location/Location;->getHeading()D

    move-result-wide v2

    invoke-virtual {v0, v2, v3}, Lnbisdk/ra;->setHeading(D)V

    :cond_9
    and-int/lit8 v2, v1, 0x10

    if-lez v2, :cond_a

    invoke-virtual {p1}, Lcom/nbi/location/Location;->getHorizontalVelocity()D

    move-result-wide v2

    invoke-virtual {v0, v2, v3}, Lnbisdk/ra;->f(D)V

    :cond_a
    and-int/lit8 v2, v1, 0x20

    if-lez v2, :cond_b

    invoke-virtual {p1}, Lcom/nbi/location/Location;->getGpsTime()J

    move-result-wide v2

    long-to-int v2, v2

    int-to-long v2, v2

    invoke-virtual {v0, v2, v3}, Lnbisdk/ra;->setTime(J)V

    :cond_b
    and-int/lit16 v1, v1, 0x80

    if-lez v1, :cond_6

    invoke-virtual {v0, v4, v5}, Lnbisdk/ra;->x(D)V

    invoke-virtual {v0, v4, v5}, Lnbisdk/ra;->y(D)V

    invoke-virtual {p1}, Lcom/nbi/location/Location;->getAccuracy()I

    move-result v1

    int-to-double v1, v1

    invoke-virtual {v0, v1, v2}, Lnbisdk/ra;->z(D)V

    goto/16 :goto_3
.end method

.method public final onDestroy()V
    .locals 1

    const/4 v0, 0x0

    :try_start_0
    iput-boolean v0, p0, Lnbisdk/gf;->rZ:Z

    invoke-direct {p0}, Lnbisdk/gf;->jf()V

    const/4 v0, 0x0

    iput-object v0, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    const/4 v0, 0x0

    iput-object v0, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    iget-object v0, p0, Lnbisdk/gf;->rW:Lnbisdk/cj;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/gf;->rW:Lnbisdk/cj;

    invoke-interface {v0}, Lnbisdk/cj;->destroy()V

    :cond_0
    const/4 v0, 0x0

    iput-object v0, p0, Lnbisdk/gf;->rW:Lnbisdk/cj;

    iget-object v0, p0, Lnbisdk/gf;->rX:Lnbisdk/hi;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lnbisdk/gf;->rX:Lnbisdk/hi;

    invoke-interface {v0}, Lnbisdk/hi;->destroy()V

    :cond_1
    const/4 v0, 0x0

    iput-object v0, p0, Lnbisdk/gf;->rX:Lnbisdk/hi;

    invoke-super {p0}, Lcom/nbi/location/LocationProvider;->onDestroy()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method public final onLocationError(I)V
    .locals 2

    iget-boolean v0, p0, Lnbisdk/gf;->rZ:Z

    if-nez v0, :cond_1

    :cond_0
    return-void

    :cond_1
    :goto_0
    iget-object v0, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    invoke-virtual {v0}, Ljava/util/Vector;->size()I

    move-result v0

    if-lez v0, :cond_3

    iget-object v0, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    invoke-virtual {v0}, Ljava/util/Vector;->firstElement()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnbisdk/ia;

    if-eqz v0, :cond_1

    invoke-virtual {v0}, Lnbisdk/ia;->js()Lcom/nbi/location/LocationListener;

    move-result-object v1

    if-eqz v1, :cond_2

    invoke-interface {v1, p1}, Lcom/nbi/location/LocationListener;->onLocationError(I)V

    :cond_2
    iget-object v1, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    invoke-virtual {v1, v0}, Ljava/util/Vector;->removeElement(Ljava/lang/Object;)Z

    goto :goto_0

    :cond_3
    const/4 v0, 0x0

    move v1, v0

    :goto_1
    iget-object v0, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    invoke-virtual {v0}, Ljava/util/Vector;->size()I

    move-result v0

    if-ge v1, v0, :cond_0

    iget-object v0, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    invoke-virtual {v0, v1}, Ljava/util/Vector;->elementAt(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnbisdk/ia;

    if-eqz v0, :cond_4

    invoke-virtual {v0}, Lnbisdk/ia;->js()Lcom/nbi/location/LocationListener;

    move-result-object v0

    if-eqz v0, :cond_4

    invoke-interface {v0, p1}, Lcom/nbi/location/LocationListener;->onLocationError(I)V

    :cond_4
    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_1
.end method

.method public final onLowMemory()V
    .locals 0

    return-void
.end method

.method public final providerStateChanged(I)V
    .locals 3

    const/4 v2, 0x0

    iget-boolean v0, p0, Lnbisdk/gf;->rZ:Z

    if-nez v0, :cond_1

    :cond_0
    return-void

    :cond_1
    iput p1, p0, Lnbisdk/gf;->nV:I

    move v1, v2

    :goto_0
    iget-object v0, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    invoke-virtual {v0}, Ljava/util/Vector;->size()I

    move-result v0

    if-ge v1, v0, :cond_3

    iget-object v0, p0, Lnbisdk/gf;->rU:Ljava/util/Vector;

    invoke-virtual {v0, v1}, Ljava/util/Vector;->elementAt(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnbisdk/ia;

    if-eqz v0, :cond_2

    invoke-virtual {v0}, Lnbisdk/ia;->js()Lcom/nbi/location/LocationListener;

    move-result-object v0

    if-eqz v0, :cond_3

    invoke-interface {v0, p1}, Lcom/nbi/location/LocationListener;->providerStateChanged(I)V

    :cond_2
    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_0

    :cond_3
    move v1, v2

    :goto_1
    iget-object v0, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    invoke-virtual {v0}, Ljava/util/Vector;->size()I

    move-result v0

    if-ge v1, v0, :cond_0

    iget-object v0, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    invoke-virtual {v0, v1}, Ljava/util/Vector;->elementAt(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnbisdk/ia;

    if-eqz v0, :cond_4

    invoke-virtual {v0}, Lnbisdk/ia;->js()Lcom/nbi/location/LocationListener;

    move-result-object v0

    if-eqz v0, :cond_4

    invoke-interface {v0, p1}, Lcom/nbi/location/LocationListener;->providerStateChanged(I)V

    :cond_4
    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_1
.end method

.method public final startReceivingFixes(Lcom/nbi/location/LocationListener;)V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/nbi/location/LocationException;
        }
    .end annotation

    iget-boolean v0, p0, Lnbisdk/gf;->rZ:Z

    if-nez v0, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    if-nez p1, :cond_2

    new-instance v0, Lcom/nbi/location/LocationException;

    const/16 v1, 0x7d0

    invoke-direct {v0, v1}, Lcom/nbi/location/LocationException;-><init>(I)V

    throw v0

    :cond_2
    new-instance v0, Lnbisdk/ba;

    iget-object v1, p0, Lnbisdk/gf;->ca:Lcom/nbi/common/NBIContext;

    invoke-direct {v0, v1, p0}, Lnbisdk/ba;-><init>(Lcom/nbi/common/NBIContext;Lcom/nbi/location/LocationListener;)V

    invoke-virtual {v0, p1}, Lnbisdk/ia;->a(Lcom/nbi/location/LocationListener;)V

    iget-object v1, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    if-eqz v1, :cond_0

    iget-object v1, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    invoke-virtual {v1, v0}, Ljava/util/Vector;->contains(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_0

    iget-object v1, p0, Lnbisdk/gf;->rV:Ljava/util/Vector;

    invoke-virtual {v1, v0}, Ljava/util/Vector;->addElement(Ljava/lang/Object;)V

    invoke-virtual {v0}, Lnbisdk/ia;->aS()Z

    move-result v0

    if-nez v0, :cond_0

    const/16 v0, 0x2346

    invoke-virtual {p0, v0}, Lnbisdk/gf;->onLocationError(I)V

    goto :goto_0
.end method

.method public final stopReceivingFixes(Lcom/nbi/location/LocationListener;)V
    .locals 0
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/nbi/location/LocationException;
        }
    .end annotation

    if-eqz p1, :cond_0

    invoke-virtual {p0, p1}, Lnbisdk/gf;->cancelGetLocation(Lcom/nbi/location/LocationListener;)V

    :cond_0
    return-void
.end method
